<?php

/**
 * Experience form.
 *
 * @package    docplus.co.za
 * @subpackage form
 * @author     Fox Matuku
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class ExperienceForm extends BaseExperienceForm
{

    public function configure()
    {
        unset(
            $this['created_at'], $this['updated_at']
        );

        $this->widgetSchema['topic'] = new sfWidgetFormInputHidden();
        $this->widgetSchema['name']->setLabel('Your name');
        $this->widgetSchema['email']->setLabel('Your email');
        $this->widgetSchema['description']->setLabel('Your experience description');

        $this->validatorSchema['name'] = new sfValidatorString(array('max_length' => 255, "required" => true), array("required" => '*Your name* is required.', 'max_length' => 'Only 255 characters allowed!'));
        $this->validatorSchema['email'] = new sfValidatorEmail(array('max_length' => 255, "required" => true), array("invalid" => '*Your email* is invalid.', "required" => '*Your email* is required.', 'max_length' => 'Only 255 characters allowed!'));
        $this->validatorSchema['description'] = new sfValidatorString(array('max_length' => 300, "required" => true), array("required" => '*Your description* is required.', 'max_length' => 'Only 300 characters allowed!'));
    }

}
